Adwaita: GtkSwitch size reduction and tweaks
authorLapo Calamandrei <calamandrei@gmail.com>
Fri, 8 Aug 2014 21:31:33 +0000 (23:31 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Fri, 8 Aug 2014 21:36:55 +0000 (23:36 +0200)
See https://bugzilla.gnome.org/show_bug.cgi?id=734485

gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 829a1f0df2eb57bb739bb6dae843ebd92c768681..c2ca0891fa4edbdd9fb63a89f6969f07ddf886a6 100644 (file)
@@ -1515,7 +1515,7 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
 
 GtkSwitch {
   // FIXME: backdrop insensinsitive slider on the dark variant
-  -GtkSwitch-slider-width: 47px; // 57px is the right value to make it as tall
+  -GtkSwitch-slider-width: 45px; // 55px is the right value to make it as tall
                                  // as buttons, not doing that for now
   font: bold condensed 9;
   outline-offset: -4px;
@@ -1531,15 +1531,18 @@ GtkSwitch {
     background-color: mix($bg_color,$borders_color,60%);
     text-shadow: 0 1px transparentize(black, 0.9);
     &:active {
+      @include progressbar_fill;
       color: white;
       border-color: $selected_borders_color;
-      background-color: $selected_bg_color;
       box-shadow: $widget_edge;
-      text-shadow: 0 0 2px white;
+      //text-shadow: 0 1px transparentize($selected_borders_color,0.5);
+      text-shadow: 0 1px transparentize($selected_borders_color,0.5),
+                   0 0 2px transparentize(white,0.4);
     }
     &:insensitive {
       color: $insensitive_fg_color;
       border-color: $borders_color;
+      background-image: none;
       background-color: $insensitive_bg_color;
       box-shadow: $widget_edge;
       text-shadow: none;
@@ -1547,6 +1550,7 @@ GtkSwitch {
     &:backdrop {
       color: $backdrop_fg_color;
       border-color: $backdrop_borders_color;
+      background-image: none;
       background-color: $backdrop_dark_fill;
       box-shadow: none;
       text-shadow: none;
index 69ae7d894a2823d31a693b03fbdfc2b61fd0b1aa..d90e5b151c4299831bec73878d08495915b04d48 100644 (file)
@@ -1594,7 +1594,7 @@ GtkTreeView.view.progressbar {
  * Switch *
  **********/
 GtkSwitch {
-  -GtkSwitch-slider-width: 47px;
+  -GtkSwitch-slider-width: 45px;
   font: bold condensed 9;
   outline-offset: -4px;
   box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
@@ -1606,20 +1606,22 @@ GtkSwitch {
     background-color: #2d3232;
     text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
     GtkSwitch.trough:active {
+      background-image: linear-gradient(to bottom, #215d9c 2px, #266cb5);
       color: white;
       border-color: #0f2b48;
-      background-color: #215d9c;
       box-shadow: 0 1px rgba(238, 238, 236, 0.1);
-      text-shadow: 0 0 2px white; }
+      text-shadow: 0 1px rgba(15, 43, 72, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); }
     GtkSwitch.trough:insensitive {
       color: #939695;
       border-color: #1c1f1f;
+      background-image: none;
       background-color: #323636;
       box-shadow: 0 1px rgba(238, 238, 236, 0.1);
       text-shadow: none; }
     GtkSwitch.trough:backdrop {
       color: #c9cbc9;
       border-color: #1e2222;
+      background-image: none;
       background-color: #2f3434;
       box-shadow: none;
       text-shadow: none; }
index 73287cca237a5b48f9570baa34d30df9513070ef..e8b05cc3bdb1d55e4b9212ae59c572516b05f642 100644 (file)
@@ -1588,7 +1588,7 @@ GtkTreeView.view.progressbar {
  * Switch *
  **********/
 GtkSwitch {
-  -GtkSwitch-slider-width: 47px;
+  -GtkSwitch-slider-width: 45px;
   font: bold condensed 9;
   outline-offset: -4px;
   box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px white; }
@@ -1600,20 +1600,22 @@ GtkSwitch {
     background-color: #cecece;
     text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
     GtkSwitch.trough:active {
+      background-image: linear-gradient(to bottom, #4a90d9 2px, #63a0de);
       color: white;
       border-color: #184472;
-      background-color: #4a90d9;
       box-shadow: 0 1px white;
-      text-shadow: 0 0 2px white; }
+      text-shadow: 0 1px rgba(24, 68, 114, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); }
     GtkSwitch.trough:insensitive {
       color: #8d9091;
       border-color: #a1a1a1;
+      background-image: none;
       background-color: #f4f4f4;
       box-shadow: 0 1px white;
       text-shadow: none; }
     GtkSwitch.trough:backdrop {
       color: #54595a;
       border-color: #a8a8a8;
+      background-image: none;
       background-color: #d4d4d4;
       box-shadow: none;
       text-shadow: none; }